<foreach name="category" item="i">
    <a id="category1" href="{:U('Index/Category',array('id'=>$i['id']))}">
        {$i['cname']}</a>&nbsp;&nbsp;
</foreach>
<style>
    a#category1{
        width: 55px;
        height: 25px;
        background-color: #eef4fa;
        color: #3e7ac2;
        display: inline-block;
        text-align: center;
        padding-top: 3px;
        float: left;
        border-radius:3px;
        margin-right: 10px;
    }
</style>